package com.gtw.visitor;

/**
 * 具体访问者:影响访问者访问到一个类后该干什么
 */
public class ConcreteIVisitor implements IVisitor {

    public void visit(ConcreteElement1 concreteElement1) {
        System.out.println("参观者去参观了元素1:");
        concreteElement1.doSomething();
    }

    public void visit(ConcreteElement2 concreteElement2) {
        System.out.println("参观者去参观了元素2:");
        concreteElement2.doSomething();
    }
}
